#pragma once

#ifndef _STUDENT_USEDPOOL_
#define _STUDENT_USEDPOOL_

#include <vector>
using namespace std;

class StudentUsedInfo {
public:
	StudentUsedInfo(const CString& strTestNumber,const COleDateTime& time);
	StudentUsedInfo(const CString& strTestNumber);
	bool operator==(const StudentUsedInfo& rhs);
	const CString& GetTestNumber();
	const COleDateTime& GetTime();

protected:
	CString m_strTestNumber;
	COleDateTime m_time;
};

//------------------------------------------------------------

class StudentUsedPool {
public:
	static StudentUsedPool& GetInstance();
	static StudentUsedInfo* IsUsing(StudentUsedInfo* pT);
	static bool Add(StudentUsedInfo* pT);
	static bool Remove(StudentUsedInfo* pT);
	static const COleDateTimeSpan& GetReservedDaySapn();

private:
	StudentUsedPool(void);
	~StudentUsedPool(void);
	BOOL Load(const CString& pathHistory);
	BOOL Save(const CString& pathHistory);

private:
	UINT ReservedDay;
	COleDateTimeSpan ReservedDaySapn;
	CString m_pathHistory;
	std::vector<StudentUsedInfo*> m_UsingPool;
};


#endif /* _STUDENT_USEDPOOL_ */
